
$(function(){
      $(".write").click(function(){
        var str =location.search.slice(1).split('=')[1]
        $.ajax({
            type:"post",
            url: "http://127.0.0.1:3007/my/gain/gain",
            data:{
                author_id:str,
                title:$(".text2").val(),
                content:$(".text3").val()
            },
            success:function(data){
                console.log(data);
                location.href="list.html"
            }
          })
       })
    })